<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="css/app.css">
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/account/user.css"/>
    <link rel="stylesheet" type="text/css" href="css/order/order.css"/>
    <script type="text/javascript" src="js/base/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/base/underscore-min.js"></script>
    <script type="text/javascript" src="js/base/moment.min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/magiclamp.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue-filter.js"></script>
    <script src="js/base/vue.js"></script>
    <script src="js/orders.js?a=4"></script>

    <title>华迅直购</title>
</head>
<body class="whitesmoke">
<!--订单-->
    <div id="orderlist">
        <div class="com-tag" id="order-tab">
            <a href="#" :class="show_index==0?'tag-on':''" @click="show_index=0"><span>未付款</span></a>
            <a href="#" :class="show_index==1?'tag-on':''" @click="show_index=1"><span>已付款</span></a>
            <a href="#" :class="show_index==2?'tag-on':''" @click="show_index=2"><span>已完成</span></a>
            <!--<a href="#"><span>售后服务</span></a>-->
        </div>
        <!--未付款-->
        <div class="unfinished-order " v-if="show_index==0">
            <div class="order-item g-wrap border-top" v-for="payorder in un_pay_order_list">
                <div v-for="order in payorder.goods_order_list" @click="open_order_info(order.id)">
                    <div class="my-order-title line">
                        <div v-text="'订单号:'+order.id"></div>
                        <div class="red-font">
                            <p v-if="order.goods_status==0">未发货</p>
                            <p v-if="order.goods_status==1">正在备货</p>
                            <p v-if="order.goods_status==2">已发货</p>
                            <p v-if="order.goods_status==3">已收货</p>
                            <p v-if="order.goods_status==4">已完成</p>
                        </div>
                    </div>
                    <div class="line" v-for="goods in order.goods_order_item_list">
                        <div class="g-item">
                            <div class="g-item-wrap">
                                <a href="#" class="g-img">
                                    <img :src="baseConfig.qn_host + goods.small_image__fileurl+'?imageView2/1/w/80/h/80'">
                                </a>
                                <div class="g-i-info">
                                    <p class="g-i-name order-goods-title" v-text="goods.goods__name"></p>
                                    <p class="order-goods-mark margin-bottom" v-if="goods.gg">
                                        {{goods.gg}}</p>
                                    <p class="order-goods-mark" v-if="goods.bz" v-text="'备注:'+goods.bz"></p>
                                    <p class="order-goods-mark">商品ID:{{goods.goods_id}}</p>
                                    <p class="order-count">
                                        <span class="order-goods-price"
                                              v-text="price_filter(goods.price-goods.bu_tie_price)"></span>
                                        <span class="order-goods-num">数量{{goods.num}}</span>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="my-order-title">
                    <div>共{{payorder.goods_num}}件商品</div>
                    <div class="red-font">合计:<span class="price" v-text="price_filter(payorder.price)"></span>
                    </div>
                </div>


                <div class="pay-btn-group border-top">
                    <button class="delete-payorder-btn" @click="delete_payorder(payorder)">取消订单</button>
                    <button class="open-payorder-btn" @click="open_payorder(payorder.id)">去支付</button>
                </div>
            </div>
            <div class="more" @click="query_un_pay_order_info_list" v-show="no_page_index!=no_page_count">加载更多……
            </div>
            <div class="com-notice" v-show="un_pay_order_list.length==0">
                <div class="icon-wrap">
                    <i class="iconfont icon-dingdan"></i>
                </div>
                <p>暂无订单</p>
            </div>
        </div>
        <!--已付款-->
        <div class="finished-order" v-if="show_index==1">
            <div class="order-item g-wrap" v-for="order in goods_order_list" @click="open_order_info(order.id)">
                <div class="my-order-title line">
                    <div v-text="'订单号:'+order.id"></div>
                    <div class="red-font">
                        <span class="price" v-if="order.goods_status==0">未发货</span>
                        <span class="price" v-if="order.goods_status==1">正在备货</span>
                        <span class="price" v-if="order.goods_status==2">已发货</span>
                        <span class="price" v-if="order.goods_status==3">已收货</span>
                        <span class="price" v-if="order.goods_status==4">已完成</span>
                    </div>
                </div>
                <div class="line" v-for="goods in order.goods_order_item_list">
                    <div class="g-item" @click="open_order_info(order.id)">
                        <div class="g-item-wrap">
                            <a href="#" class="g-img">
                                <img :src="baseConfig.qn_host + goods.small_image__fileurl+'?imageView2/1/w/80/h/80'">
                            </a>
                            <div class="g-i-info">
                                <p class="g-i-name order-goods-title" v-text="goods.name"></p>
                                <p class="order-goods-mark margin-bottom" v-if="goods.gg">
                                    {{goods.gg}}</p>
                                <p class="order-goods-mark" v-if="goods.bz" v-text="'备注:'+goods.bz"></p>
                                <p class="order-goods-mark">商品ID:{{goods.goods_id}}</p>
                                <p class="order-count">
                                    <span class="order-goods-price" v-text="price_filter(goods.price-goods.bu_tie_price)"></span>
                                    <span class="order-goods-num">数量{{goods.num}}</span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="my-order-title">
                    <div>共{{order.goods_num}}件商品</div>
                    <div class="red-font">合计:<span class="price" v-text="price_filter(order.price+order.express_fee-order.bu_tie_price-order.bu_tie_express_price)"></span>
                    </div>
                </div>
                <div class="order-info dn-info" v-if="order.goods_status==2&&order.dispute_step==0">
                    <div class="order-btn">
                        <button class="red-button" type="button" v-if="order.dispute_step==0"
                                @click.stop="make_goods_order(order)">
                            确认收货{{shengyudays(order)}}
                        </button>

                    </div>

                </div>
                <div class="order-info dn-info" v-if="order.goods_status==3&&order.dispute_step==0">
                    <div class="order-btn">
                        <button class="red-button" type="button" v-if="order.dispute_step==0"
                                @click.stop="make_goods_order(order)">
                            完成订单
                        </button>

                    </div>

                </div>
                <div class="order-info dn-info" v-if="order.dispute_step!=0&&order.dispute_step!=3">
                    <div class="order-btn">
                        <button class="red-button" type="button" @click="open_dispute_order(order, $event)">
                            未确认收货，已投诉
                        </button>
                    </div>
                </div>
            </div>
            <div class="more" @click="query_pay_order_info_list" v-show="pay_page_index!=pay_page_count">加载更多……
            </div>
            <div class="com-notice" v-show="goods_order_list.length==0">
                <div class="icon-wrap">
                    <i class="iconfont icon-dingdan"></i>
                </div>
                <p>暂无订单</p>
            </div>
        </div>
        <!--已完成-->
        <div class="finished-order" v-if="show_index==2">
            <div class="order-item g-wrap" v-for="order in pay_order_list" @click="open_order_info(order.id)">
                <div class="my-order-title line">
                    <div v-text="'订单号:'+order.id"></div>
                    <div class="red-font">
                        <p v-if="order.status==1&&order.goods_status==0">未发货</p>
                        <p v-if="order.status==1&&order.goods_status==1">正在备货</p>
                        <p v-if="order.status==1&&order.goods_status==2">已发货</p>
                        <p v-if="order.status==1&&order.goods_status==3">已收货</p>
                        <p v-if="order.status==1&&order.goods_status==4">已完成</p>
                        <p v-if="order.status==-2">正在退款</p>
                        <p v-if="order.status==-3">已退款</p>
                    </div>
                </div>
                <div class="line" v-for="goods in order.goods_order_item_list">
                    <div class="g-item" @click="open_order_info(order.id)">
                        <div class="g-item-wrap">
                            <a href="#" class="g-img">
                                <img :src="baseConfig.qn_host + goods.small_image__fileurl+'?imageView2/1/w/80/h/80'">
                            </a>
                            <div class="g-i-info">
                                <p class="g-i-name order-goods-title" v-text="goods.name"></p>
                                <p class="order-goods-mark margin-bottom" v-if="goods.gg">
                                    {{goods.gg}}</p>
                                <p class="order-goods-mark" v-if="goods.bz" v-text="'备注:'+goods.bz"></p>
                                <p class="order-goods-mark">商品ID:{{goods.goods_id}}</p>
                                <p class="order-count">
                                    <span class="order-goods-price" v-text="price_filter(goods.price-goods.bu_tie_price)"></span>
                                    <span class="order-goods-num">数量{{goods.num}}</span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="my-order-title">
                    <div>共{{order.goods_num}}件商品</div>
                    <div class="red-font">合计:{{price_filter(order.price+order.express_fee-order.bu_tie_price-order.bu_tie_express_price)}}</div>
                </div>

            </div>
            <div class="more" @click="query_goods_order_list" v-show="over_page_index!=over_page_count">加载更多……
            </div>
            <div class="com-notice" v-show="pay_order_list.length==0">
                <div class="icon-wrap">
                    <i class="iconfont icon-dingdan"></i>
                </div>
                <p>暂无订单</p>
            </div>
        </div>


    </div>
</body>
</html>